import request from "@/request/ajax.js";
let ztpmTenant =
  import.meta.env.VITE_API_URL +
  import.meta.env.VITE_API_ALIAS +
  import.meta.env.VITE_API_TENANT;

  let ztpmSys =
  import.meta.env.VITE_API_URL +
  import.meta.env.VITE_API_ALIAS +
  import.meta.env.VITE_API_ZTPMSYS;


// 账户列表
export const apiGetAccountList = (params, msg) => {
  return request.get(ztpmTenant + "/user/page", params, msg);
};
// 激活用户
export const apiPutActiveUser = (params, msg) => {
  return request.putGet(ztpmTenant + "/user/activate", params, msg);
};
// 禁用用户
export const apiPutDisableUser = (params, msg) => {
  return request.putGet(ztpmTenant + "/user/forbid", params, msg);
};
// 删除用户
export const apiDeleteUser = (params, msg) => {
  return request.delete(ztpmTenant + "/user/delete", params, msg);
};
// 新增用户
export const apiPostCreateUser = (params, msg) => {
  return request.post(ztpmTenant + "/user/create", params, msg);
};
// 修改用户
export const apiPutUpdateUser = (params, msg) => {
  return request.put(ztpmTenant + "/user/update", params, msg);
};
// 重置密码
export const apiPutResetPassword = (params, msg) => {
  return request.putGet(ztpmTenant + "/user/reset/password", params, msg);
};

// 角色分配
export const apiPutRoleAssign = (params, msg) => {
  return request.put(ztpmSys + "/user/role/assign", params, msg);
};